package gui

import (
	"context"
	"gitee.com/xgh2012/wails_common/wails_apps"
	"gitee.com/xgh2012/wails_common/wails_core"
	"gitee.com/xgh2012/wails_common/wails_core/systems"
)

// Register struct
type Register struct {
	Ctx context.Context
}

// Register 注册
func (a *Register) Register(code string) *wails_core.Result {
	err := systems.DoRegister(wails_apps.SoftName, code)
	if err != nil {
		return wails_core.Wrong(1001, err.Error(), nil)
	}
	return wails_core.Success(nil)
}
